<?php
echo "已知三角形的边角边，计算对边\n";
echo "请输入三角形的边角边，个数据间用逗号隔开来：\n";
$count=fscanf(STDIN,"%f,%f,%f %s",$a,$beta,$b,$others);
if($count>3){
    echo "输入的数据\n\n";
}else if($count<3){
    echo"数据输入有误\n";
    die();
}
$c=round(sqrt($a*$a+pow($b,2)-2*$a*$b*cos($beta*pi()/180)),2);
echo "三角形渡边长度=$c\n";